package com.mwh.yuantu.dao;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mwh.yuantu.dao.mapper.StarInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mwh.yuantu.entity.StarInfoEntity;

/**
 * (StarInfo)表数据库访问层
 *
 * @author maweihong
 * @since 2023-11-01 09:47:32
 */
@Service
public class StarInfoDao extends ServiceImpl<StarInfoMapper , StarInfoEntity> {

    @Autowired
	private StarInfoMapper starInfoMapper;

    /**
     * 查询明星列表
     */
    public List<StarInfoEntity> list(){
        return starInfoMapper.list();
    }

    /**
     * 查询单个明星的信息
     * @param id
     * @return
     */
    public StarInfoEntity selectById(String id){
        return starInfoMapper.selectById(id);
    }

    /**
     * 插入一条明星数据
     * @param starInfo
     */
    public int insert(StarInfoEntity starInfo){
        return starInfoMapper.insert(starInfo);
    }

    /**
     * 更新一条明星数据
     * @param starInfo
     */
    public int update(StarInfoEntity starInfo){
        return starInfoMapper.update(starInfo);
    }
}

